//
//  TopicQuote.m
//  MGameTribe
//
//  Created by 杨敏 on 13-6-13.
//  Copyright (c) 2013年 YangMin. All rights reserved.
//

#import "TopicQuote.h"
#import "Tool.h"

@implementation TopicQuote
+(TopicQuote *)TopicQuoteWithData:(NSDictionary *)data{
    TopicQuote *quote=[[TopicQuote alloc]init];

    if (!checkDict(data)) {
        return nil;
        return quote;
    }
    
//    NSString *tie_id=getSafeStringWithObject(data[APIKEY_tie_id]);
//    NSString *user_id=getSafeStringWithObject(data[APIKEY_user_id]);
//    NSString *discuz_id=getSafeStringWithObject(data[APIKEY_discuz_id]);
//    quote.tie_id=tie_id;
//    quote.user_id=user_id;
//    quote.discuz_id=discuz_id;
//    
//    NSString *content = getSafeStringWithObject(data[APIKEY_content]);
//    content=EmojiStringWithoutBreakLine(content);
//    quote.content=content;
//    
//    NSString *timeStr=getSafeStringWithObject(data[APIKEY_dateline]);
//    timeStr=[MGTool getTime:[timeStr doubleValue]];
//
//    quote.formmatedTimeStr=timeStr;
//    
//    NSString *floor =getSafeStringWithObject(data[APIKEY_floor]);
//    quote.floor=floor;
//    
//    NSString *faceStr=data[APIKEY_uface];
//    NSURL *faceUrl =[MGTool getImgUrlWithImgStr:faceStr];
//    quote.ufaceUrl=faceUrl;
//    
//    id genderValue = data[APIKEY_gender];
//    Gender gender = checkValue(genderValue)?[genderValue integerValue]:Gender_unkown;
//    quote.gender=gender;
//    
//    NSString *nickname=getSafeStringWithObject(data[APIKEY_nickname]);
//    quote.nickname=nickname;
//    
//    NSString *picture =data[APIKEY_picture];
//    NSURL *pictureUrl =[MGTool getImgUrlWithImgStr:picture];
//    
//    NSString *width = data[APIKEY_imgwidth];
//    NSString *height = data[APIKEY_imgheight];
    
//    quote.imgwidth=checkValue(width)?[width floatValue]:0;
//    quote.imgheight=checkValue(height)?[height floatValue]:0;
//    quote.pictrueUrl=pictureUrl;
    
    return quote;
}

@end
